
Partial Class Login
    Inherits System.Web.UI.Page


    Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) Handles Login1.Authenticate
        If Membership.ValidateUser(Login1.UserName, Login1.Password) Then
            FormsAuthentication.SetAuthCookie(Login1.UserName, Login1.RememberMeSet)
            'Dim UserData As GTSDAL.ClientINFODataTable
            'Dim days As Integer
            'If (String.IsNullOrEmpty(Login1.UserName) = False) Then
            '    If (Not Roles.IsUserInRole(Login1.UserName, "GTSAdministrator")) Then
            '        UserData = GTSSystem.BLL.Client.LookupClientbyClientId(Profile.ClientId)
            '        days = UserData.Item(0).ContractEndDate.Subtract(DateTime.Today).TotalDays
            '        If (days <= 30) Then
            '            Session.Add("DisplayWarning", "True")
            '        End If
            '    End If
            'End If
            Response.Redirect(FormsAuthentication.GetRedirectUrl(Login1.UserName, Login1.RememberMeSet))
        End If
    End Sub

 
End Class
